<%@page import="Model.Purchase.PurchaseOfferList"%>
<%@page import="RssEasy.Core.DateTimeExtend"%>
<%@page import="Model.Purchase.PurchaseList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
   PurchaseList pur = new PurchaseList(pageContext);
   PurchaseList pu = new PurchaseList(pageContext);
   PurchaseOfferList pol = new PurchaseOfferList(pageContext);
   pur.request();
   pol.request();
   pu.request();
   pol.select("count(*) as num").where("purchaseid=?",pol.get("id")).get_first_rows();
   pur.select().where("id=?",pur.get("id")).get_first_rows();
   pu.select().where("id=?",pur.get("id")).get_first_rows();
%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>企企通-寻源管理-报名企业</title>
        <meta name="description" content="这里写网站内容描述" />
        <meta name="keywords" content="这里写关键词" />
        <meta name="Robots" contect="all">
        <link href="/css/reset.css" rel="stylesheet" type="text/css" />
        <link href="css/my_sourec.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <h1 project="<%pur.write("id");%>">寻源管理</h1>
        <div id="detailsBox">
            <h2>我的项目：<%pur.write("name");%></h2>
            <table>
                <tr><td>项目名称：</td><td><%pur.write("name");%></td></tr>
                <tr><td>项目类别：</td><td purchase="<%pur.write("purchase_class");%>"></td></tr>
                <tr><td>所属行业：</td><td>建筑</td></tr>
                 <%
                    String enddt =pu.get("enddt");
                    if(enddt.equals("2769091200"))
                    {
                        enddt="长期有效";
                        pu.keyvalue("enddt","");
                    }else{
                       enddt ="";
                    }
                %>
                <tr class="line"><td>截止时间：</td><td rssdate="<%pu.write("enddt");%>,yyyy-MM-dd"><%=enddt%></td></tr>
                <tr class="line">
                    <td>公告内容：</td>
                    <td><%pur.write("summary");%></td>
                </tr>
                <tr class="line">
                    <td>供应商资格：</td>
                    <td><%pur.write("conditions");%></td>
                </tr>
                <%
                 long ti = DateTimeExtend.timestamp()+(86400*7);
                 long day  = Long.parseLong(pur.get("enddt"));
                 long l = Long.parseLong("2769091200");
                 String condition="";
                 if(ti-day<=0){
                 condition="已截至";
                 }else{
                 condition="进行中";
                 }
                 if(day==l){
                 condition="长期有效";
                 }
                %>
                <tr><td>报名情况：</td><td><%=condition%></td></tr>
                <tr><td>报名人数：</td><td><%pol.write("num");%></td></tr>
            </table>
        </div>
        <div id="companyList">
            <h2>报名企业列表</h2>
            <table>
                <thead>
                <tr>
                    <td>企业名称</td>
                    <td>联系人</td>
                    <td>联系电话</td>
                    <td>报名时间</td>
                </tr>
                </thead>
                <tbody id="tbody">
                </tbody>
            </table>
            <!--分页-->
            <div id="page">
            <a href= "javascript:void(0);" id="first" onclick ="first()" sort="">首页</a>
            <a href= "javascript:void(0);" id="previous" onclick ="previous()" sort="">上一页</a>
            <a><b>1</b>/<b></b></a>
            <a href= "javascript:void(0);" id="next" onclick ="next()" sort="">下一页</a>
            <a href= "javascript:void(0);" id="last" onclick ="last()" sort="">尾页</a>
            <a>跳转</a>
            <input type="text" name="jump" value=""/>
            <a href= "javascript:void(0);" id="jump" onclick ="jump()" sort="">确定</a>
            </div>
        </div>
        <%@include file="/inc/js_all.html" %>
        <script src="js/my_sourec.js" type="text/javascript"></script>
        <script type="text/javascript" src="/purchase/js/dictdata.js"></script>
    </body>
</html>
